import { http } from '@/utils/http'
import regionList from './json/getRegion.json'

/**
 * 获取行业类型
 * @returns ICaptcha 验证码
 */
interface RegionItem {
  grade: number
  id: number
  parent: number
  text: string
  value: number | string
}
export function getRegion(): any {
  // return http.get<RegionItem[]>('/mch/tpl/getRegion.html')
  return new Promise((resolve, reject) => {
    const res = regionList
    if (res.code === 1) {
      resolve(res.list)
    }
    else {
      reject(res.msg)
    }
  })
}
